﻿

if col_length('Coupon', 'IsCumulable') is null
begin
 	alter table coupon add IsCumulable bit null
end
go

update Coupon
Set IsCumulable = 0
where IsCumulable is null
Go

alter table Coupon alter column IsCumulable bit not null
Go


if col_length('Coupon', 'IsExclusive') is null
begin
 	alter table coupon add IsExclusive bit null
end
go

update Coupon
Set IsExclusive = 0
where IsExclusive is null
Go

alter table Coupon alter column IsExclusive bit not null
Go

if col_length('Coupon', 'AuthenticationMandatory') is null
begin
 	alter table coupon add AuthenticationMandatory bit null
end
go

update Coupon
Set AuthenticationMandatory = 0
where AuthenticationMandatory is null
Go

alter table Coupon alter column AuthenticationMandatory bit not null
Go

if col_length('Coupon', 'MaximumUserCount') is null
begin
 	alter table coupon add MaximumUserCount int null
end
go